<div class="row">
<?if(isset($system_message))echo $system_message;?>
<?echo $this->pagination->create_links();?>

	<?if(!empty($grade_level_section_data)):?>
	<fieldset>
		<legend>Available Sections</legend>
	<table>	
		<thead>
		<tr>
			<th>Section Name</th>
			<th>Grade Level Assigned:</th>
			<th>Section Adviser:</th>
			<th>Remaining Slot:</th>
			<th>Maximum Slot:</th>
			<th>&nbsp;</th>
			<th>&nbsp;</th>
		</tr>
		</thead>
		<tbody>
		<?foreach($grade_level_section_data as $gld):?>
			<tr>
				<td><?=$gld->section_name;?></td>
				<td><?=$gld->level_desc;?></td>
				<td><?=$gld->advisers_name;?></td>
				<td><?=$gld->remaining_slot;?></td>
				<td><?=$gld->max_load;?></td>
				<td><a href="<?=site_url('admin/update_section').'/'.$gld->id;?>" class="edt">Edit data</td>
				<?if($gld->section_status == 'active'):?>
					<td><a href="<?=site_url('admin/destroy_section').'/'.$gld->id;?>" class="del">Destroy Item</td>
				<?elseif($gld->section_status == 'inactive'):?>
					<td><a href="<?=site_url('admin/undestroy_section').'/'.$gld->id;?>" class="add">Undo Destroy</td>
				<?endif;?>
			</tr>
		<?endforeach;?>
		</tbody>
	</table>
		<a href="<?=site_url('admin/add_section');?>" class="btn btn-mini btn-primary"><i class="icon-plus"></i> Add Section</a>
	</fieldset>
	<?else:?>
		<fieldset>
			<legend>Warning!</legend>
			<div class="notice">No Items to display <a href="<?=site_url('admin/add_section');?>" class="add">Add Section</a></div>
		</fieldset>
	<?endif;?>
</div>